ELEMENTS

Public Notification
  • account_tree
  • bug_report

<table>

행과 열로 구성된 표를 나타낸다. 하나의 표가 생성이 되기 위해서는 <table> 요소 하위에 최소한의 계층순으로 하나 이상의 <tr>, <td> 요소가 존재해야 한다.

  • 콘텐츠 분류

  • 허용된 부모 요소 또는 위치

    FLOW CONTENT

    플로우 콘텐츠(flow-content)가 예상되는 위치

  • 허용된 자식 요소

    SCRIPT SUPPORTING, <CAPTION>, <COLGROUP>, <TBODY>, <TFOOT>, <THEAD>, <TR>

    순서대로 선택적으로 <caption> 요소, 0개 이상의 <colgroup> 요소, 선택적으로 <thead> 요소, 0개 이상의 <tbody> 요소 또는 하나 이상의 <tr> 요소, 선택적으로 <tfoot> 요소, 선택적으로 스크립트 지원(script supporting) 요소

  • 콘텐츠 모델

  • 태그 생략

    시작 태그, 종료 태그 모두 작성

  • DOM Interface

    HTMLTableElement

    [Exposed=Window]
    interface HTMLTableElement : HTMLElement {
      [HTMLConstructor] constructor();
    
      [CEReactions] attribute HTMLTableCaptionElement? caption;
      HTMLTableCaptionElement createCaption();
      [CEReactions] undefined deleteCaption();
    
      [CEReactions] attribute HTMLTableSectionElement? tHead;
      HTMLTableSectionElement createTHead();
      [CEReactions] undefined deleteTHead();
    
      [CEReactions] attribute HTMLTableSectionElement? tFoot;
      HTMLTableSectionElement createTFoot();
      [CEReactions] undefined deleteTFoot();
    
      [SameObject] readonly attribute HTMLCollection tBodies;
      HTMLTableSectionElement createTBody();
    
      [SameObject] readonly attribute HTMLCollection rows;
      HTMLTableRowElement insertRow(optional long index = -1);
      [CEReactions] undefined deleteRow(long index);
    
      // also has obsolete members
    };

구문

마크업 형식
<table> <tr><td></td></tr>
</table>
Example

글로벌 애트리뷰트

일부 글로벌 애트리뷰트는 이 요소에서 사용되지 않을 수 있다.

글로벌 이벤트 핸들러

일부 글로벌 이벤트 핸들러는 이 요소에서 사용되지 않을 수 있다. 이벤트 등록은 자바스크립트 사용을 권장한다.

버전 명세

HTML Standard
#the-table-element

지원 웹브라우저